/* 背景遮罩 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
  backdrop-filter: blur(2px);
}

/* 状态选择器容器 */
.statusSelector {
  position: fixed;
  z-index: 9999;
  width: 300px;
  max-height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid #e0e0e0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: selectorFadeIn 0.2s ease-out;
}

@keyframes selectorFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 头部 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title > span {
  font-size: 14px;
  font-weight: 600;
}

.roomNumber {
  font-size: 12px;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
}

.closeBtn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.closeBtn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 当前状态 */
.currentStatus {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.statusBadge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 分类筛选 */
.categoryFilter {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.categoryBtn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 16px;
  font-size: 11px;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.categoryBtn:hover {
  border-color: #999;
  color: #333;
}

.categoryBtn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* 状态列表 */
.statusList {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}

.noStatus {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
  font-style: italic;
}

.statusItem {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 4px solid transparent;
  position: relative;
}

.statusItem:hover:not(.disabled) {
  background: rgba(0, 0, 0, 0.05);
  border-left-color: currentColor;
}

.statusItem.current {
  background: rgba(102, 126, 234, 0.1);
  border-left-color: #667eea;
}

.statusItem.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.statusInfo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.statusName {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}

.icon {
  font-size: 14px;
}

.text {
  flex: 1;
}

.statusDescription {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.3;
}

.currentBadge {
  position: absolute;
  top: 8px;
  right: 16px;
  background: #667eea;
  color: white;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
}

/* 底部提示 */
.footer {
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #f0f0f0;
}

.hint {
  font-size: 11px;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

/* 滚动条美化 */
.statusList::-webkit-scrollbar {
  width: 4px;
}

.statusList::-webkit-scrollbar-track {
  background: transparent;
}

.statusList::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.statusList::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .statusSelector {
    width: 280px;
    max-height: 400px;
  }
  
  .header {
    padding: 12px 16px;
  }
  
  .currentStatus,
  .categoryFilter {
    padding: 12px 16px;
  }
  
  .statusItem {
    padding: 10px 16px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .statusSelector {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .currentStatus,
  .categoryFilter {
    border-color: #4a5568;
  }
  
  .label {
    color: #a0aec0;
  }
  
  .categoryBtn {
    background: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .categoryBtn:hover {
    border-color: #718096;
  }
  
  .statusItem:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .footer {
    background: #1a202c;
    border-color: #4a5568;
  }
  
  .hint {
    color: #a0aec0;
  }
  
  .noStatus {
    color: #718096;
  }
}

